var url = window.location.href;

var start = url.indexOf("://") + 3;
var end = url.indexOf("/api/");
var post_url = url.substring(start, end);
